package com.alipay.config;
import java.io.FileWriter;
import java.io.IOException;

/* *
 *锟斤拷锟斤拷锟斤拷AlipayConfig
 *锟斤拷锟杰ｏ拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷
 *锟斤拷细锟斤拷锟斤拷锟斤拷锟绞伙拷锟叫癸拷锟斤拷息锟斤拷锟斤拷锟斤拷路锟斤拷
 *锟睫革拷锟斤拷锟节ｏ拷2017-04-05
 *说锟斤拷锟斤拷
 *锟斤拷锟铰达拷锟斤拷只锟斤拷为锟剿凤拷锟斤拷锟教伙拷锟斤拷锟皆讹拷锟结供锟斤拷锟斤拷锟斤拷锟斤拷锟诫，锟教伙拷锟斤拷锟皆革拷锟斤拷锟皆硷拷锟斤拷站锟斤拷锟斤拷要锟斤拷锟斤拷锟秸硷拷锟斤拷锟侥碉拷锟斤拷写,锟斤拷锟斤拷一锟斤拷要使锟矫该达拷锟诫。
 *锟矫达拷锟斤拷锟斤拷锟窖帮拷锟斤拷芯锟街э拷锟斤拷锟斤拷涌锟绞癸拷茫锟街伙拷锟斤拷峁┮伙拷锟斤拷慰锟斤拷锟�
 */

public class AlipayConfig{
	
//锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟侥伙拷锟斤拷锟斤拷息锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷

	// 应锟斤拷ID,锟斤拷锟斤拷APPID锟斤拷锟秸匡拷锟剿号硷拷锟斤拷锟斤拷锟斤拷APPID锟斤拷应支锟斤拷锟斤拷锟剿猴拷
	public static String app_id = "9021000136648665";
	
	// 锟教伙拷私钥锟斤拷锟斤拷锟斤拷PKCS8锟斤拷式RSA2私钥,(锟斤拷锟斤拷锟斤拷锟斤拷锟缴碉拷私锟阶ｏ拷也锟斤拷锟斤拷锟斤拷支锟斤拷锟斤拷锟斤拷锟斤拷平台锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟缴碉拷锟角革拷应锟斤拷私锟斤拷)
    public static String merchant_private_key = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCL0659eM8hKL60Rm77pXcoJl6SUipyE1m8ho0qNINdnchAPKo9bDML7kSgCBif8fZyWPPwgNPS21St7u08hjoVUBmdeffefi6XxknfMGgPrbzrqH08CPB8qzhEp9mLOk+cUATPSw9lKyKWqbaCGuHXKu9w8L0pYoqdqf3RpAqlrPxVvAOqQtrxhBemVyLca7bOJk/q7GawNJ3aYtpuLUbLGKx95+jt4It1TUqlwORZjMoCK5nB+ULdmVSdPY7X1MsNMMPp4RWraS9ZBjZalgx2pjcJpetxiwrAzgz9eI737iALz44HsdrCGiXx+Q9781w3CqRWGk0nNgw85/Hvu1GtAgMBAAECggEABm7DnUQci1L7iwGeg3c2RyOUwDiFeWAIhdLO1b06uejTWJkx38eFhav9fjtBHsKb6uDKwCq9E/tBJwtR4LHwJCDePM9qptK5RAQ8S8dHUklU4qaKtGNY5PNfkFEEghI5rWBFCGBUofvdCH9gRRYFg8eW4mRA35GH/P7gDW/1iW+dOepITK7U25bDZi51UsMrvjMYilTQEc5wRPFvlivcmsdh0eAtDj+CoK+nT70/Hv0BhRBJ3BVlty92ajhN0frzRo+Ccpjwtotmn6S/1bm0infyu4BU6OCbDVzL5uyWxxj0Ipyh8Pa9U6ppz/Iab58hX5f4XRKXBsZO5YFDVHWDgQKBgQDfcbi79axUvz4GCIEoWogTOy7YAGKLL6o6fGWmJUACnjkPeyLOH29typS26lqj/284odOCD6z3kX6S6ddwvFe0xB/PbbVoABmGAba28nNUJ5QJkm5YyEmSCQBQNTL2yekTlcLqIMvysgcpBN7W4PwkCO0QuFvzIKMjbGmF2THRzQKBgQCgMxrIFyftUypjumCXfCiKv8/sSjNi4QnqK35ONySPmtTdLhLjEfswKQqZYzd6fp2RM1vVxpHEPioS/EZF/YkJlzNXpkCf32987hOuZ+uBsqCjMi5IbuEw40ow9hS2WViURGW/XJvXYuHewMmGfXRKX8IMcBELXoLN/8ZE4j8fYQKBgAYoThzv4jXbp0vnRBfmlsVg5iORryWCxMAj2XFAqYjo702b6ROhDiMKaBq6TpEiYuA+pWN6JxwTaFeIFiXHKuuSVAYVUeBx0EI/HdfgyojRJmU1IdFUg6KAmP+c17CxU7j0cZCeIsCnY0cgGTv2qzwa+t1xFyeWCKjbPfUwTQ0pAoGBAJEG8t3lqK2/NobmOX+qVQGXOGKPogmH9PPbwBKK9TxUTRSXG14Z7y7gWMoX+ieY7IiA2Eil5Vylcm2RmQTPy/m0ujRFPAf/vOx6k7K2PYxC7A4R5biJOLCLc6Tzgji6lehUK1CcRDEvQY/pNAffFyIlooSkB6olO4HGZfYCZGbBAoGBAKc57k9hLa+TLzXkeTssdCgtH1RqzZ7M2EBENJ4ygaoLEIsblGZyECTFTA3yc+8M/5l6HergHLiEMdvlh++psNGMXriQTXWzmTRQvRP5mWzCXsVIhaSQxIJ7a72GaLCqdZ2qwVjCiqTOkhsKeELZYTlE7oEhMaOmGokzQ67Fuygy";
	
	// 支锟斤拷锟斤拷锟斤拷钥,锟介看锟斤拷址锟斤拷https://openhome.alipay.com/platform/keyManage.htm 锟斤拷应APPID锟铰碉拷支锟斤拷锟斤拷锟斤拷钥锟斤拷锟斤拷锟斤拷应锟斤拷锟阶ｏ拷
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAkLiyDquZp8Rzs6ui7/2w5J0JCLCmlitq8gVjadRX1Cv/ykDnoyoFiCZFki1zxAWo6rYjkUgyidvOOOi5fbAiWemXlIvq6D1/il9mpbdTh1d7GyGJ6dN7eqFutzo/W/fazg9qkUApnagFXOYQgZYU3uVDXYMverHpK0uyMBFAIfmtt5fxQt05h9O7kGlgxlnSpH3mpjcEnRNLgMq2MooB0jD/lHwUDp/9VGAVt/dpVb4yTPvaN3pyjw8k+e6csdB1tantfZc1zOwy3Q71W6zchTNqFOvXG1JxKnd89hYLrfPvDRwPZvORDb1YzSncHz4laA9GgROsUv4fwbovYEGCeQIDAQAB";

	// 锟斤拷锟斤拷锟斤拷锟届步通知页锟斤拷路锟斤拷  锟斤拷http://锟斤拷式锟斤拷锟斤拷锟斤拷路锟斤拷锟斤拷锟斤拷锟杰硷拷?id=123锟斤拷锟斤拷锟皆讹拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷剩锟絟ttp://localhost:8080锟斤拷支锟斤拷失锟杰碉拷路锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟揭伙拷锟絡sp锟斤拷锟斤拷锟斤拷锟斤拷没写锟斤拷
	public static String notify_url = "http://localhost:8080/zhengshidazuoye/notify_url.jsp";

	// 页锟斤拷锟斤拷转同锟斤拷通知页锟斤拷路锟斤拷 锟斤拷http://锟斤拷式锟斤拷锟斤拷锟斤拷路锟斤拷锟斤拷锟斤拷锟杰硷拷?id=123锟斤拷锟斤拷锟皆讹拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷剩锟絟ttp://localhost:8080/untitled_war_exploded锟斤拷支锟斤拷锟缴癸拷锟斤拷锟斤拷转锟斤拷路锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟揭伙拷锟絡sp锟斤拷锟斤拷锟斤拷锟斤拷写锟斤拷锟斤拷锟揭碉拷Tomcat锟斤拷锟斤拷锟経RL锟斤拷
	public static String return_url = "http://localhost:8080/zhengshidazuoye/return_url.jsp";

	// 签锟斤拷锟斤拷式锟斤拷锟斤拷锟矫讹拷
	public static String sign_type = "RSA2";
	
	// 锟街凤拷锟斤拷锟斤拷锟绞斤拷锟斤拷锟斤拷枚锟�
	public static String charset = "utf-8";
	
	// 支锟斤拷锟斤拷锟斤拷锟截ｏ拷锟斤拷锟斤拷胤锟斤拷沾锟绞憋拷锟侥拷喜锟斤拷锟缴筹拷械牡锟街凤拷锟絟ttps://openapi.alipay.com/gateway.do锟斤拷要锟侥筹拷锟斤拷锟斤拷锟斤拷锟斤拷锟�
	public static String gatewayUrl = "https://openapi-sandbox.dl.alipaydev.com/gateway.do";
	
	// 支锟斤拷锟斤拷锟斤拷锟斤拷
	public static String log_path = "";


//锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟侥伙拷锟斤拷锟斤拷息锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷

    /** 
     * 写锟斤拷志锟斤拷锟斤拷锟斤拷锟斤拷裕锟斤拷锟斤拷锟秸撅拷锟斤拷锟揭诧拷锟斤拷愿某砂鸭锟铰硷拷锟斤拷锟斤拷锟斤拷菘猓�
     * @param sWord 要写锟斤拷锟斤拷志锟斤拷锟斤拷谋锟斤拷锟斤拷锟�
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                  
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}

